Skip to content

chore: remove dead code from AuthorizationCode - #32784

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-dead-code-from-authorizationcode-1bdc61
Open

chore: remove dead code from AuthorizationCode#32784
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-dead-code-from-authorizationcode-1bdc61

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 7, 2026

Copy link
Copy Markdown

Removed the unused 7-arg constructor, the redirectUriProvidedExplicitly
field, and its never-called getter/setter from AuthorizationCode.java.
A whole-repo search found zero callers of the 7-arg constructor (both
production sites use the no-arg constructor + setters), and the
redirectUriProvidedExplicitly field/accessors are unused on this
class (the only call to setRedirectUriProvidedExplicitly is on the
sibling AuthorizationParams class). The field's only writer was the
removed constructor, so it cascaded to fully dead.

Describe your changes:

Fixes #N/A (dead-code cleanup, no associated issue)

I worked on removing unused code from AuthorizationCode.java because
the 7-arg constructor and redirectUriProvidedExplicitly accessors
had zero callers and were misleading (the constructor notably omits
the PKCE-essential codeVerifier, so using it would produce a code
that fails PKCE verification).

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change (single file, ~27 lines removed).

Tests:

Use cases covered

Unit tests

  • N/A — no logic change; removal of uncalled constructor/accessors.
    Verified build (mvn compile -pl openmetadata-mcp) and existing tests pass:
    OAuthHttpStatelessServerTransportProviderTest (26 tests) and the auth
    handler tests (AuthorizationHandlerTest, McpCallbackServletTest,
    RegistrationHandlerTest, RevocationHandlerTest — 67 tests) all green.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

History


Dead Code PRs can be configured here.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 5b5f60642829bb0a109ce076c9453b9d3f389aa3 in Playwright run 34071147562, attempt 1.

✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 48m 2s

⏱️ Max setup 6m 3s · max shard execution 19m 24s · max shard-job elapsed before upload 22m 25s · reporting 3s

🌐 234.18 requests/attempt · 2.82 app boots/UI scenario · 17.44% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 17.44% (convergence target: at most 15%).
  • Browser traffic was 234.18 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.82 per UI scenario (1630 boots / 578 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 147 0 0 0 0 0
✅ Shard chromium-02 130 0 0 0 0 0
✅ Shard chromium-03 122 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant